<%@ codepage=65001%>
<!-- #include file="log.asp" -->
<script language="JScript" runat="Server">
function obj2str(o){
	var r = [];
	if(typeof o =="string") return "\""+o.replace(/([\'\"\\])/g,"\\$1").replace(/(\n)/g,"\\n").replace(/(\r)/g,"\\r").replace(/(\t)/g,"\\t")+"\"";
	if(typeof o =="undefined") return "";
	if(typeof o == "object"){
		if(o===null) return "null";
		else if(!o.sort){
			for(var i in o)
				r.push(i+":"+obj2str(o[i]))
			r="{"+r.join()+"}"
		}else{
			for(var i =0;i<o.length;i++)
				r.push(obj2str(o[i]))
			r="["+r.join()+"]"
		}
		return r;
	}
	return o.toString();
}
//var a = obj2str([{"userId":51649347,"state":1,"email":"3@3.com","emailFlag":0,"createTime":"2012-08-05T14:03:36.000+0000","updateTime":"2013-05-07T03:23:48.000+0000","friendCount":0,"auth_token":"NXhTZkhPek5VR3MvVXJqUDY3S3pBZz09Ond2L2xKaVdjcFp6WXd6NkZaSllkc2c9PQ","lastLoginTime":"2013-05-07T03:23:48.000+0000","mobileFlag":0,"lastLoginIp":3673487960,"sns_accounts":[],"uploadLocation":0}]);
</script>
<%
Session.CodePage=65001
Response.Charset="utf-8"

token = request("token")
url = request("url")
iType = request("type")

if token <> "" then
	session("token") = token
end if
'Response.Write(url)
'http://api.laijiaoliu.com/me/mediawiki/index.php/User_me
set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHTTP.Open "POST", url, False
'xmlHTTP.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
'if token <> "" then
	xmlHTTP.setRequestHeader "auth_token",token
'end if
xmlHTTP.send()
strResponse = xmlHTTP.responseText
'strResponse = xmlHTTP.ResponseBody
set xmlHTTP = nothing

if iType = "me" then
	session("userPhoneInfo")=obj2str(strResponse)
end if

logStr = Write_Log(strResponse)

Response.Write(strResponse)

%>